home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 June: Reference Library / Dev.CD Jun 99 RL Disk 1.toast / Technical Documentation / Macintosh Technotes and Q&As / technotes / nw / MacTCP_Changes / MacTCP Header Changes Overview < prev    next >
Encoding:
Text File  |  1997-12-10  |  7.0 KB  |  102 lines  |  [TEXT/R*ch]

  1. ..HHÚ(ÿáÿâùFG(üHHÚ(d'Δ@•,<•f•H•H•H•H•  ‡•33 of    ©©0`±HH/N–*PO`Úp/HmÛ*N–¢J•POÄJ®ÿ›g  S• @BHmÙÎ/.ÿôN–jJ•POfp+@Èrindow.hhcÿÿÿÿÿÿÿÿ
  2. Àxxfer.h.hhcÿÿÿÿÿÿÿÿ2! !Move&Re.namÿÿÿÿÿÿÿÿinder ‚Finder ˛FinderØ≤¸⁄pR4øÎ€∫hJ,.    Helvetica    HelveticaCourierCourier<0d0d0d0d0d0dÊZÿÿÿÿ ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ. ÿÿÿÿ.ÿÿ‡ÿ>?ÿÿÿÿÿHHÒ••••)k<ÿ ÿÿÿ‡ÿ>?ÿÿÿÿÿHHÒ••••)k ÿ H™∂    ∏
  3. É  ñ
  4. ‡ËË®4c    8''à<3´
  5. JåK√(MacTCP 1.1 Header File Incompatibilities and Fixes
  6.  
  7. MacTCP 1.1, AppleÕs System7 compatible version of MacTCP fixes several problems in earlier releases, but failed to address several incompatibilities in the header files.
  8.  
  9. This short note outlines the problems with the 1.1 header files, but does not include the fixes.  Patches in the form of MPW ÒcompareÓ output are available on AppleÕs Develope Apple cannot provide the new headers directly, as they are only available as part of the ÒMacTCP DevelopersÕ KitÓleÕs Developer CD series.   Apple cannot provide the new headers directly, as they are only available as part of the ÒMacTCP DevelopersÕ KitÓ, not provide the new headers directly, as they are only available as part of the ÒMacTCP De@ÿøBgB§?.ÿflN– Ê0=@ÿøHning the problem and classification of the problem.
  10.  
  11. NOTE: These changes have not been thoroughly tested, so you will have to use them at your own risk.
  12.  
  13.  
  14. All Files
  15.  
  16. (1) General Problem
  17. Eachhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhsing the:
  18.  
  19. #ifdef __cplusplus
  20. extern header file is missing the:
  21.  
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25.  
  26. and:
  27.  
  28. #ifdef __cplusplus
  29. extern "C" {
  30. #endif
  31.  
  32. which are necessary for C++ unmangling.
  33.  
  34. (2) General Problem
  35. There are no #ifdefs to prevent including a file multiple times, as in other Apple headers.  This was fixed by adding the following to each of the header files:
  36.  
  37. #ifndef __MACTCPCOMMONTYPES__
  38. #define __MACTCPCOMMONTYPES__
  39. ...
  40. #endif
  41.  
  42. where ÒMACTCPCOMMONTYPESÓ is replaced by the name of the header file.
  43.  
  44. (2a) Think C Problem
  45. Think C before 5.0 does not support pascal typedefs, which MacTCP makes use of, so #ifdef THINK_C was added in several instances to declare these pascal typedef functions as type ProcPtr.  This fixes t
  46.  
  47. GetMyIPixes the problem.
  48.  
  49.  
  50. GetMyIPAddr.h
  51.  
  52. (3) General Problem
  53. ParamBlockHeader is used as a #define here, conflicting with its use in <Files.h>.  The solution is to change the name of the #define to IPParamBlockHeader.
  54.  
  55.  
  56. MiscIPPB.h
  57.  
  58. (4) General Problem
  59. Same as (3) above.  In this case, it was changed to GetIPParamBlockHeader.
  60.  
  61. (5) General Problem
  62. The structure IPParamBlock is defined in this file with a different definition from the one in GetMyIPAddr.h.  The solution is to change the name of the struct.
  63.  
  64. (6) General Problem
  65. AppleTalk.h is required for successful compilation.  Code was added to include this if it has not already been included.
  66.  
  67. (7) General Problem
  68. icmpEchoTimeoutErr is defined in MacTCPCommonTypes in addition to being defined in MiscIPPB.h.  Solution is to remove its definition here.
  69.  
  70.  
  71. AddressXLation.h
  72.  
  73. (8) Think C Incompatibility
  74. The ÒintÓ type is used within the ÒhostInfoÓ structure definition.  The default size of an int is different from Think to MPW.  In all cases, int in the MacTCP headers should be changed to long.
  75.  
  76. (9)Think C Incompatibility
  77. The returnRec struct uses an int.  Fix is to change to a long as above.
  78.  
  79. (10) Think C Incompatibility
  80. The CloseResolver() prototype is defined with an empty parameter list, not with a void parameter list.  Think C requires the void to consider the definition a prototype.  The fix is to add the void keyword as the function parameter list.
  81.  
  82. (11) C++ Incompatibility
  83. The cacheEntryRecord struct uses a variable named ÒclassÓ.  This causes major problems with C++ compilers, since the class keyword takes on a different meaning in this instance.  The fix is to change this to ÒcacheClassÓ.
  84.  
  85.  
  86. dnr.c
  87.  
  88. (12) General/Think C Problem
  89. The typedef for OSErrProcPtr was incomplete, causing ambiguity for argument casting.  This was chagned to "typedef OSErr (*OSErrProcPtr)(long,...);"  to make sure the first parameter to the name resolver calls is passed as a long.
  90.  
  91. (13) Think C Incompatibility
  92. Defines in Think default to short, not long, so all name resolver calls are made incorrectly.  This is fixed by the typedef in (12), but Think 4.0.5 does not recognize partial prototypes correctly.  The fix is to add a ÒLÓ to the end of each of the name resolver command #defines.
  93.  
  94. (14) Think C Incompatibility
  95. The MXInfo() procedure has ) Think C Incompatibility
  96. The MXInfo() procedure has an extra semicolon after the trailing brace Ò};Ó which causes a syntax error with the Think C compiler.  The semicolon was removed to fix the problem.available from APDA (part #M0704/C).
  97.  
  98. The problems with the headers can be grouped into three areas: General bugs or shortcomings, Think C incompatibilities, and C++ incompatibilities.  I have listed the header problems below, organized by the file containZ3ªV
  99. d
  100. !
  101. 
  102. (¡FÕÿçˇ K¡y—ÃHîfiç±ÿÿÿÿHHÒ••••0>ltÿ ÿÿÿÿ>?ÿÿÿÿÿHHÒ••••ÿ>ltÿ •I∂àÿÿÿ>?ÿÿÿÿÿHHÒ•••• f0ÿÿÿÿ>?ÿÿÿÿÿHHÒ••••0)kÿ ÿÿÿÿ>?ÿÿÿÿÿHHÒ••••®)kÿ •4⁄pÿÿÿ>?ÿÿÿÿÿHHÒ•••• 0)kÿ •4ŸÀ√›ÒÒQèE3™¬"5è…ÂOúÉÑná@◊>ò[*Yíª¡R¸T¸≠/dâAÕ%ÆG"ıiS‚+o®£˙@ùÀPÅ˚ëKÇ*Ä£J›FaP¬®BmœÕ•ÂUjzYñª¿•URpD‘«2"µÙiL≈a+äT‚œ:XªY}1.Eª©T S(ãQ„)˙$®ÎÔz)Wˆ≈M≈*Éˇ®•()"T∞π•`^@ ?    áZ(ëeͬ˝õµ(Ô‹ºPç.\r»@I¢8u